package com.example.demo.mapper;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * json通用的数据接入接口
 */
@Repository
public interface DataAccessMapper {

    int batchInsertData(@Param("tableName") String tableName, @Param("cols") Set<String> cols, @Param("data") List<Map<String, Object>> data);

    int insertData(@Param("tableName") String tableName, @Param("cols") Set<String> cols, @Param("data") Map<String, Object> data);

    void batchDeleteData(@Param("tableName") String tableName, @Param("col") String col, @Param("dataList") List<String> dataList);

    void updateDataByKey(@Param("tableName") String tableName, @Param("col") String col,@Param("colValue") String colValue,@Param("params") Map<String,Object> params);
}
